package com.ahp.bean;

/**
 * ModuleFactorId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class ModuleFactorId implements java.io.Serializable {

	// Fields

	private Module module;
	private Factor factor;
	private Integer level;
	private Integer pid;

	// Constructors

	/** default constructor */
	public ModuleFactorId() {
	}

	/** full constructor */
	public ModuleFactorId(Module module, Factor factor, Integer level,
			Integer pid) {
		this.module = module;
		this.factor = factor;
		this.level = level;
		this.pid = pid;
	}

	// Property accessors

	public Module getModule() {
		return this.module;
	}

	public void setModule(Module module) {
		this.module = module;
	}

	public Factor getFactor() {
		return this.factor;
	}

	public void setFactor(Factor factor) {
		this.factor = factor;
	}

	public Integer getLevel() {
		return this.level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	public Integer getPid() {
		return this.pid;
	}

	public void setPid(Integer pid) {
		this.pid = pid;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ModuleFactorId))
			return false;
		ModuleFactorId castOther = (ModuleFactorId) other;

		return ((this.getModule() == castOther.getModule()) || (this
				.getModule() != null
				&& castOther.getModule() != null && this.getModule().equals(
				castOther.getModule())))
				&& ((this.getFactor() == castOther.getFactor()) || (this
						.getFactor() != null
						&& castOther.getFactor() != null && this.getFactor()
						.equals(castOther.getFactor())))
				&& ((this.getLevel() == castOther.getLevel()) || (this
						.getLevel() != null
						&& castOther.getLevel() != null && this.getLevel()
						.equals(castOther.getLevel())))
				&& ((this.getPid() == castOther.getPid()) || (this.getPid() != null
						&& castOther.getPid() != null && this.getPid().equals(
						castOther.getPid())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getModule() == null ? 0 : this.getModule().hashCode());
		result = 37 * result
				+ (getFactor() == null ? 0 : this.getFactor().hashCode());
		result = 37 * result
				+ (getLevel() == null ? 0 : this.getLevel().hashCode());
		result = 37 * result
				+ (getPid() == null ? 0 : this.getPid().hashCode());
		return result;
	}

}